package Stream_liu;

import java.util.ArrayList;
import java.util.Collections;

public class Test {
    public static void main(String[] args) {
        ArrayList<String> arr = new ArrayList();
        Collections.addAll(arr, "张三","王五","李四","王七七","王三清","王八");
        // 集合.stream() 是获取集合的流对象流对象再调方法对该集合进行一系列处理、筛选、排序、聚合等
        arr.stream().filter(s -> s.contains("王")).filter(s -> s.length() == 3).forEach(s -> System.out.println(s));
        System.out.println("jjjk");
    }
}
